#ifndef _MYFOLLOWINGFORM_H_
#define _MYFOLLOWINGFORM_H_

#include <FBase.h>
#include <FUi.h>
#include<FGraphics.h>
#include<FMedia.h>
#include"FSocial.h"

#include"TwitterReplyForm.h"
#include"TwitterUsernameProfileForm.h"

#include "../Utility/Downloader.h"
class MyFollowingForm: public Osp::Ui::Controls::Form,
		public Osp::Ui::IItemEventListener,
		public Osp::Ui::IActionEventListener,
		public Osp::Media::IImageDecodeUrlEventListener {

public:
	MyFollowingForm(void);
	virtual ~MyFollowingForm(void);
	bool Initialize();
	result OnInitializing(void);
	result OnTerminating(void);

private:
	static const int ID_OPTIONMENU = 102;
	static const int ID_OPTIONMENU_REPLY = 103;
	static const int ID_OPTIONMENU_USERPROFILE = 104;
	static const int ID_OPTIONMENU_MORELISTFRIEND = 108;
	static const int ID_SOFTKEY_BACK = 105;
	static const int ID_SOFTKEY_XEMFRIENDINMAP = 106;
	static const int ID_SOFTKEY_SHOWMAP = 107;
	static const int ID_ELEMENT_NAME = 401;
	static const int ID_ELEMENT_ACTIVITY = 402;
	static const int ID_BUTTON_NEXT = 403;
	static const int ID_BUTTON_HOME = 404;

	Osp::Ui::Controls::OptionMenu*pOptionMenu;
	Osp::Ui::Controls::List* __pFollowerList;
	int indexSelectedInList;
	Osp::Base::Collection::IList *listFriendFollowing;

	Osp::Ui::Controls::Button*pButtonNext;
	Osp::Ui::Controls::Button*pButtonHome;
	bool IsOpenedOptionMenu;
	static int FormId;
	Osp::Base::Collection::HashMap __pPicturesCache;
	long requestId;

public:
	void SetFormId(int id) {
		FormId = id;
	}

	static int GetFormId() {
		return FormId;
	}
public:
	void SetStateToButton(bool home, bool next, bool stateOption, bool showMap);
	int GetIndecSelectInList();
	Osp::Graphics::Bitmap* GetBitmap(int i);
	Osp::Graphics::Bitmap*GetBitmapN(const Osp::Base::String& name);
	void ThongBaoLoi(Osp::Base::String value);
	void HienThiViTriMotBanBe();
public:
	void OnActionPerformed(const Osp::Ui::Control& source, int actionId);
	void AddFollowingList(Osp::Base::Collection::IList*pList);
	void OnItemStateChanged(const Control& source, int index, int itemId,
			Osp::Ui::ItemStatus status);
	void RequestArrayListPhoto();

	virtual void OnImageDecodeUrlReceived(RequestId reqId,
			Osp::Graphics::Bitmap* pBitmap, result r,
			const Osp::Base::String errorCode,
			const Osp::Base::String errorMessage);
	void DecodeUrlImage();
private:
	int indexDecodeUrlCurrent;
};

#endif
